<script type="text/javascript" language="javascript" charset="utf-8">
$(".menu-wrap li").removeClass("active-link");
$(".menu-wrap #statistic").addClass("active");
$("#statistic #info").addClass("active-link");
$("#statistic #teacher a").addClass("active-link");
</script>
<div class="common-tit">
  <h2>导师数据</h2>
  <span>数据统计 > 导师数据</span>
</div>
<div class="xdata-box">
  <h3>导师本月课消排行榜</h3>
  <div id="teaData"></div>
</div>
<script src="/assets/js/echarts.common.min.js"></script>
<script src="/assets/js/common.js"></script>
<script>
var myChart = echarts.init(document.getElementById('teaData'));

var course_teacher_name_array = <%== @course_teacher_name_array %>;
var course_teacher_amount_array = <%== @course_teacher_amount_array %>;

option = {
  tooltip: {
    trigger: 'axis',
  },
  legend: {
    data: ['2011年', '2012年']
  },
  grid: {
    left: '10%',
    right: '4%',
    top: '1%',
    containLabel: false
  },
  toolbox: {
    show : true,
  },
  xAxis: {
    type: 'value',
    boundaryGap: [0, 0.01]
  },
  yAxis: {
    type : 'category',
    axisLabel:{
      interval:0,
      rotate:0,
      margin:2,
      textStyle:{
        color:"#222"
      }},
    data: course_teacher_name_array
  },
  series: [
  {
    name: '课消金额(元)',
    type: 'bar',
    data: course_teacher_amount_array
  }
  ]
};

myChart.setOption(option);
</script>
